import 'package:flutter/material.dart';
import 'package:heyangkuaidai/DemonStrateModule/Components/NavigationBar.dart';
import 'package:flutter_screenutil/screenutil.dart';
import 'package:heyangkuaidai/DemonStrateModule/Components/AccountDetailCardItem.dart';
import 'package:heyangkuaidai/DemonStrateModule/Components/TwoLabelItem.dart';
class AccountFindDetailPage extends StatefulWidget {
  @override
  _AccountFindDetailPageState createState() => _AccountFindDetailPageState();
}

class _AccountFindDetailPageState extends State<AccountFindDetailPage> {
  @override
  Widget build(BuildContext context) {
    ScreenUtil.init(context, width: 375, height: 667, allowFontScaling: true);
    return Scaffold(
      backgroundColor: Colors.white,
      body: Column(
        children: [
          SizedBox(height: MediaQuery.of(context).padding.top,),
          NavigationBar(false, title: "账户查询",),
          Container(
            height: ScreenUtil.screenHeight-MediaQuery.of(context).padding.top-ScreenUtil().setWidth(79),
            width: ScreenUtil.screenWidth,
            child:ListView(
                padding: EdgeInsets.only(top: 0,),
                children: [
                  Row(
                    children: [
                      SizedBox(width: ScreenUtil().setWidth(16),),
                      Container(
                        width: ScreenUtil().setWidth(16),
                        height: ScreenUtil().setWidth(16),
                        child: Text("￥",style: TextStyle(fontSize: ScreenUtil().setSp(15),color: Color(0xff41A5EE)),),
                      ),
                      Container(
                        child: Text("50.00",style: TextStyle(fontSize: ScreenUtil().setSp(36),color: Color(0xff41A5EE)),),
                      ),
                    ],
                  ),
                  Row(
                    children: [
                      SizedBox(width: ScreenUtil().setWidth(16),),
                      Container(
                        child: Text("余额",style: TextStyle(fontSize: ScreenUtil().setSp(15),color: Color(0xff999999)),),
                      ),
                    ],
                  ),
                  SizedBox(
                    height: ScreenUtil().setWidth(10),
                  ),
                  Divider(color: Color(0xffEBEBEB),height: 2,),
                  SizedBox(
                    height: ScreenUtil().setWidth(10),
                  ),
                  TwoLabelItem(title:"可用余额：" ,hitText:"￥50.00" ,rightwidth: 185,),
                  TwoLabelItem(title:"卡号：" ,hitText:"6230 9018 1812 8621 572" ,rightwidth: 185,),
                  TwoLabelItem(title:"户名：" ,hitText:"章*闯" ,rightwidth: 185,),
                  TwoLabelItem(title:"账户状态：" ,hitText:"正常" ,rightwidth: 185,),
                  TwoLabelItem(title:"开户行：" ,hitText:"益阳农商银行" ,rightwidth: 185,),
                  Container(
                    height: ScreenUtil().setWidth(10),
                    width: ScreenUtil.screenWidth,
                    color: Color(0xffF5F5F5),
                  ),
                  SizedBox(height: ScreenUtil().setWidth(25),),
                  Column(
                    children: [
                      AccountDetailCardItem(),
                      SizedBox(height: ScreenUtil().setWidth(25),),
                      Row(
                        children: [
                          SizedBox(width: ScreenUtil().setWidth(15),),
                          btnWidget("行内转账"),
                          SizedBox(width: ScreenUtil().setWidth(23),),
                          btnWidget("跨行转账"),
                          SizedBox(width: ScreenUtil().setWidth(23),),
                          btnWidget("明细查询"),
                          ],
                        ),
                    ],
                  )
          
                ],
            ) ,
          ),

        ],
      ),
    );
  }
  Widget btnWidget(String title){
    return InkWell(
      onTap: (){
        // Navigator.push(
        //   context,
        //   new MaterialPageRoute(
        //     builder: (context) => new LoanSendConfirmPage(money: money,startEndDate: widget.startEndDate,),
        //   ),
        // );
      },
      child: Container(
          decoration: BoxDecoration(
              borderRadius: BorderRadius.circular(4),
              color:Color(0xffFFFFFF),
              border: Border.all(
                  color: Color(0xff41A5EE),
                  width: 1,
                  style: BorderStyle.solid
              )
          ),
          width: ScreenUtil().setWidth(100),
          height: ScreenUtil().setWidth(40),
          child:Center(
            child: Text(title,style: TextStyle(fontSize: ScreenUtil().setSp(17),color:Color(0xff3AA3F1)),textAlign: TextAlign.center,),
          )
      ) ,
    );
  }
}
